<%@page import="shmged.com.shlcm.utils.CmShmgedType"%>
<%@page import="shmged.com.shlcm.utils.CmSettings"%>

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@include file = "/shmged/jsp/com/shlcm/portal/main/head.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>项目信息</title>
</head>
<body>
<center>
<div style="display:none" >
<div style="width: 560px;" id="<%=uuid %>browseCreateProject" >
<div class="easyui-panel" title="项目管理">
	    <form id="<%=uuid %>amCreateProject" method="post" action="<%=baseUrl %>shmged/jsp/com/shlcm/projects/createService.jsp" enctype="multipart/form-data" name="amCreateProject">
	        <input type="hidden" name="CONFcontainerName" value="<%=CmSettings.getSection("DefaultLocation").get("ShmgedContainer", "海洋运营库") %>" />
	        <input type="hidden" name="CONFfolderPath" value="<%=CmSettings.getSection("DefaultLocation").get("ProjectInfoEntryFoler", "/Default") %>" />
	        <input type="hidden" name="CONFsoftType" value="<%=CmShmgedType.ProjectInfoEntry %>" />
	    	<table border="1px" bordercolor="00BFFF" cellspacing="0px" style="border-collapse:collapse" class="easyui-panel" width="100%">
	    	     <tr>
			         <td rowspan=1 colspan=4  align=center  height="40">项目管理</td>
   		        </tr>
	    		<tr>
	    			<td align="right">项目编号:</td>
	    			<td colspan="3"><input class="easyui-validatebox" type="text" name="MBAnumber" data-options="required:true,missingMessage:'请输入项目编号！'" size="60"></input></td>
	    		</tr>
	    		<tr>
	    			<td align="right">项目名称:</td>
	    			<td colspan="3"><input class="easyui-validatebox" type="text" name="MBAname" data-options="required:true,missingMessage:'请输入项目名称！'" size="60"></input></td>
	    		</tr>
	    		<tr>
	    			<td align="right">发起人:</td>
	    			<td><input class="easyui-validatebox" type="text" name="IBAPersonalNo" ></input></td>
	    			<td align="right">项目经理:</td>
	    			<td><input class="easyui-validatebox" type="text" name="IBAManagerNo" ></input></td>
	    		</tr>
	    		<tr>
	    			<td align="right">合同编号:</td>
	    			<td colspan="3"><input class="easyui-validatebox" type="text" name="IBAContactNo" size="60"></input></td>
	    		</tr>
	    		<tr>
	    			<td align="right">工程分类:</td>
	    			<td colspan="3"><input class="easyui-validatebox" type="text" name="IBAProjectProperties" size="60"></input></td>
	    		</tr>
	    		<tr>
	    			<td align="right">工程简介:</td>
	    			<td colspan="3"><textarea name="IBAProjectDescription" style="height:120px;width: 400px;" ></textarea></td>
	    		</tr>
	    	</table>
	    </form>
	    </div>
	    <div style="text-align:center;padding:5px">
	    	<a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitProjectForm()">提交</a>
	    	<a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm()">重置</a>
	    </div>
	    <div style="display: none;">
	      <form action="<%=baseUrl %>shmged/jsp/com/shlcm/projects/viewProject.jsp" id="<%=uuid%>jumpPageId">
	          <input type="hidden" name="oid" value="" id="<%=uuid%>jumpOidId"/> 
	      </form>
	    </div>
	<script type="text/javascript">
		function submitProjectForm(){
			$('#<%=uuid %>amCreateProject').form('submit',{
				onSubmit:function (){
					//alert("amCreateProject");
				},
				success:function (data){
					//alert(data);
					if(data.indexOf("ERROR:") != -1){
						alert(data);
					}else{
						refeProject();
						$('#<%=uuid %>browseCreateProject').window('close');
					}
				}
			});
			//$('#amCreateProject').form('submit');
			//$('#amCreateProject').submit();
			
		}
		function clearForm(){
			$('#<%=uuid %>amCreateProject').form('clear');
		}


		function browseCreateProject(){
			  $('#<%=uuid %>browseCreateProject').window({
				     collapsible:false,
				     minimizable:false,
				     maximizable:false,
				     resizable:false,
				     title:"创建项目",
					 width:580,
				     height:550,
				     modal:true,
				     left:300,
				     onClose:function(){
				  	refeProject();
				  	 $('#<%=uuid %>browseCreateProject').window("destroy");
				     }
				 });
		}



		function refeProject(){
			$("#cmTabs").tabs('select',"项目信息");  
	        var tab = $('#cmTabs').tabs('getSelected');       
	        $("#cmTabs").tabs('update',{  
	        tab:tab,  
	        options:{  
	           title:'项目信息',  
	           style:{padding:'1px'},  
	       //href:URL, // 使用href会导致页面加载两次，所以使用content代替   
	           content:'<iframe name="indextab" scrolling="auto" frameborder="0" style="width:100%;height:100%;"></iframe>',  
	       closable:false,  
	       fit:true,  
	       selected:true,  
	       closable:true
	        }  
	         });  
		}
		
	</script>
	</div>
	</div>
</center>
</body>
</html>